﻿@using Kugar.MVC.DaemonUI.Enums
@using Kugar.MVC.DaemonUI.Helpers
@using Kugar.MVC.DaemonUI.PageControls.PageCommons
@using Kugar.Web.MVC
@using WS.FlowAuth.Web.Data.EF

@{
    Layout = null;
}

@{
    var info = (base_User)ViewBag.Data;
}

@using (WebUI.Controls.ModalWindow()
                .Title("新增管理员")
                .ContentHeight(300)
                .Width(480)
                .ID("divDetail")
                .AddButton(btn=>btn.Text("保存").Type(ButtonType.Submit).StyleType(ButtonStyleType.Primary))
                .Render()
                )
{
    using (WebUI.Form.Form().Ajax().Post().UpdateElementID("divDetail").Render())
    {
        @WebUI.Form.Text().Label("登录名").Name("UserName").Value(info.UserName).Render()

        if (info.UserID<=0)
        {
            @WebUI.Form.Text().Label("密码").Name("Password").Value(info.Password).Render()
        }
        else
        {
            @WebUI.Form.Label().Label("密码").Value("********")
        }

        
    }
    <style>
        .optData .field-content label {
            height: auto
        }

        .optData table {
            border: 0;
            margin: 0;
            border-collapse: collapse;
            border-spacing: 0;
        }

        .optData tr:first-child td {
            font-weight: bold;
        }

        .optData tr td {
            border: 1px solid #eee;
            padding: 0 10px;
        }
    </style>

    <script>
        $(document).ready(function() {
            $("label").attr("title", null);
        })

    </script>
}